package com.bpmn.flow.controller.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 流程定义视图
 *
 * @author rain
 */
@Data
public class TaskVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "任务编号", example = "1024")
    private String id;

    @Schema(description = "任务key", example = "leave")
    private String taskDefinitionKey;

    @Schema(description = "流程实例名称", example = "测试")
    private String processInstanceName;

    @Schema(description = "任务名字", example = "测试")
    private String name;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "结束时间")
    private Date endTime;

    @Schema(description = "持续时间", example = "1000")
    private Long durationInMillis;

    @Schema(description = "办理人id")
    private String assignee;

    @Schema(description = "任务状态", example = "2")
    private String status;

    @Schema(description = "操作类型", example = "agree")
    private String operationType;

    @Schema(description = "审批理由", example = "通过")
    private String reason;

    @Schema(description = "流程定义id")
    private String processDefinitionId;

    @Schema(description = "操作按钮")
    private List<ButtonConfig> buttonConfigs;

    @Schema(description = "流程变量")
    Map<String, Object> processVariables;

    @Schema(description = "任务变量")
    Map<String, Object> taskLocalVariables;

}
